<!DOCTYPE html>
<html lang="">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta itemprop="name" content="windows开机自启动应用">
<meta itemprop="description" content="windows开机自启动应用 背景 客户有一款竖行屏，要定向展示某个内容，具体内容是打开谷歌浏览器访问某个链接，并隐藏地址栏全屏展示
分析 开启自启动可以通过windows系统自带的功能，但要实现隐藏地址栏并全屏显示则需借助第三方工具AHK
Step1: 下载ahk AHK官网
Step2: 编写ahk脚本  创建hjb.ahk
 #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.; #Warn ; Enable warnings to assist with detecting common errors.SendMode Input ; Recommended for new scripts due to its superior speed and reliability.SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.Run, &#34;C:\Program Files\Google\Chrome\Application\chrome.exe&#34; http://117.173.165.135:60080/#/brewing_process?organization_id=1702188317321555&amp;header_device_id=1720583071272198&amp;footer_device_id=1706751284514993 --start-maximized --kioskWinWaitActive, ahk_exe chrome.exeSend, {F11}return 注意，在windows电脑上找到浏览器地址，例如我的google浏览器的运行地址是C:\Program Files\Google\Chrome\Application\chrome.">
<meta itemprop="datePublished" content="2024-07-12T16:57:00&#43;08:00" />
<meta itemprop="dateModified" content="2024-07-12T16:57:00&#43;08:00" />
<meta itemprop="wordCount" content="76">



<meta itemprop="keywords" content="" /><meta property="og:title" content="windows开机自启动应用" />
<meta property="og:description" content="windows开机自启动应用 背景 客户有一款竖行屏，要定向展示某个内容，具体内容是打开谷歌浏览器访问某个链接，并隐藏地址栏全屏展示
分析 开启自启动可以通过windows系统自带的功能，但要实现隐藏地址栏并全屏显示则需借助第三方工具AHK
Step1: 下载ahk AHK官网
Step2: 编写ahk脚本  创建hjb.ahk
 #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.; #Warn ; Enable warnings to assist with detecting common errors.SendMode Input ; Recommended for new scripts due to its superior speed and reliability.SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.Run, &#34;C:\Program Files\Google\Chrome\Application\chrome.exe&#34; http://117.173.165.135:60080/#/brewing_process?organization_id=1702188317321555&amp;header_device_id=1720583071272198&amp;footer_device_id=1706751284514993 --start-maximized --kioskWinWaitActive, ahk_exe chrome.exeSend, {F11}return 注意，在windows电脑上找到浏览器地址，例如我的google浏览器的运行地址是C:\Program Files\Google\Chrome\Application\chrome." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.lican.site/postsbak/%E5%BC%80%E6%9C%BA%E8%87%AA%E5%90%AF%E5%8A%A8%E8%AE%BE%E7%BD%AE/" />
<meta property="article:published_time" content="2024-07-12T16:57:00+08:00" />
<meta property="article:modified_time" content="2024-07-12T16:57:00+08:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="windows开机自启动应用"/>
<meta name="twitter:description" content="windows开机自启动应用 背景 客户有一款竖行屏，要定向展示某个内容，具体内容是打开谷歌浏览器访问某个链接，并隐藏地址栏全屏展示
分析 开启自启动可以通过windows系统自带的功能，但要实现隐藏地址栏并全屏显示则需借助第三方工具AHK
Step1: 下载ahk AHK官网
Step2: 编写ahk脚本  创建hjb.ahk
 #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.; #Warn ; Enable warnings to assist with detecting common errors.SendMode Input ; Recommended for new scripts due to its superior speed and reliability.SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.Run, &#34;C:\Program Files\Google\Chrome\Application\chrome.exe&#34; http://117.173.165.135:60080/#/brewing_process?organization_id=1702188317321555&amp;header_device_id=1720583071272198&amp;footer_device_id=1706751284514993 --start-maximized --kioskWinWaitActive, ahk_exe chrome.exeSend, {F11}return 注意，在windows电脑上找到浏览器地址，例如我的google浏览器的运行地址是C:\Program Files\Google\Chrome\Application\chrome."/>

	<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
	<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
	<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
	<link rel="manifest" href="/site.webmanifest">
	<link rel="mask-icon" href="/safari-pinned-tab.svg" color="">
	<link rel="shortcut icon" href="/favicon.ico">

	<title>windows开机自启动应用</title>
	<link rel="stylesheet" href="https://www.lican.site/css/style.min.d3141168199607bf3a517216ce3c263814eecdbc8fca72a9a88700799a838219.css">
	
</head>

<body id="page">
	
	<header id="site-header" class="animated slideInUp faster">
		<div class="hdr-wrapper section-inner">
			<div class="hdr-left">
				<div class="site-branding">
					<a href="https://www.lican.site">花落雨忧</a>
				</div>
				<nav class="site-nav hide-in-mobile">
					<a href="https://www.lican.site/posts">首页</a>
					<a href="https://www.lican.site/tech/">技术文档</a>
					<a href="https://www.lican.site/article/">文章</a>
					<a href="https://www.lican.site/project/">项目</a>
					<a href="https://www.lican.site/about/">关于</a>
				</nav>
			</div>
			<div class="hdr-right hdr-icons">
				<button id="menu-btn" class="hdr-btn" title="Menu"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></button>
			</div>
		</div>
	</header>
	<div id="mobile-menu" class="animated fast">
		<ul>
			<li><a href="https://www.lican.site/posts">首页</a></li>
			<li><a href="https://www.lican.site/tech/">技术文档</a></li>
			<li><a href="https://www.lican.site/article/">文章</a></li>
			<li><a href="https://www.lican.site/project/">项目</a></li>
			<li><a href="https://www.lican.site/about/">关于</a></li>
		</ul>
	</div>


	<main class="site-main section-inner thin animated fadeIn faster">
		<h1>windows开机自启动应用</h1>
		<div class="content">
			<h3 id="windows开机自启动应用">windows开机自启动应用<a href="#windows开机自启动应用" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h3>
<h4 id="背景">背景<a href="#背景" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h4>
<p>客户有一款竖行屏，要定向展示某个内容，具体内容是打开谷歌浏览器访问某个链接，并隐藏地址栏全屏展示</p>
<h4 id="分析">分析<a href="#分析" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h4>
<p>开启自启动可以通过windows系统自带的功能，但要实现隐藏地址栏并全屏显示则需借助第三方工具AHK</p>
<h5 id="step1-下载ahk">Step1: 下载ahk<a href="#step1-下载ahk" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h5>
<p><a href="https://autohotkey.com/">AHK官网</a></p>
<h5 id="step2-编写ahk脚本">Step2: 编写ahk脚本<a href="#step2-编写ahk脚本" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h5>
<blockquote>
<p>创建hjb.ahk</p>
</blockquote>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#960050;background-color:#1e0010">#</span><span style="color:#a6e22e">NoEnv</span>  ; <span style="color:#a6e22e">Recommended</span> <span style="color:#66d9ef">for</span> <span style="color:#a6e22e">performance</span> <span style="color:#a6e22e">and</span> <span style="color:#a6e22e">compatibility</span> <span style="color:#a6e22e">with</span> <span style="color:#a6e22e">future</span> <span style="color:#a6e22e">AutoHotkey</span> <span style="color:#a6e22e">releases</span>.
; <span style="color:#960050;background-color:#1e0010">#</span><span style="color:#a6e22e">Warn</span>  ; <span style="color:#a6e22e">Enable</span> <span style="color:#a6e22e">warnings</span> <span style="color:#a6e22e">to</span> <span style="color:#a6e22e">assist</span> <span style="color:#a6e22e">with</span> <span style="color:#a6e22e">detecting</span> <span style="color:#a6e22e">common</span> <span style="color:#a6e22e">errors</span>.
<span style="color:#a6e22e">SendMode</span> <span style="color:#a6e22e">Input</span>  ; <span style="color:#a6e22e">Recommended</span> <span style="color:#66d9ef">for</span> <span style="color:#a6e22e">new</span> <span style="color:#a6e22e">scripts</span> <span style="color:#a6e22e">due</span> <span style="color:#a6e22e">to</span> <span style="color:#a6e22e">its</span> <span style="color:#a6e22e">superior</span> <span style="color:#a6e22e">speed</span> <span style="color:#a6e22e">and</span> <span style="color:#a6e22e">reliability</span>.
<span style="color:#a6e22e">SetWorkingDir</span> <span style="color:#f92672">%</span><span style="color:#a6e22e">A_ScriptDir</span><span style="color:#f92672">%</span>  ; <span style="color:#a6e22e">Ensures</span> <span style="color:#a6e22e">a</span> <span style="color:#a6e22e">consistent</span> <span style="color:#a6e22e">starting</span> <span style="color:#a6e22e">directory</span>.

<span style="color:#a6e22e">Run</span>, <span style="color:#e6db74">&#34;C:\Program Files\Google\Chrome\Application\chrome.exe&#34;</span> <span style="color:#a6e22e">http</span>:<span style="color:#75715e">//117.173.165.135:60080/#/brewing_process?organization_id=1702188317321555&amp;header_device_id=1720583071272198&amp;footer_device_id=1706751284514993 --start-maximized --kiosk
</span><span style="color:#75715e"></span><span style="color:#a6e22e">WinWaitActive</span>, <span style="color:#a6e22e">ahk_exe</span> <span style="color:#a6e22e">chrome</span>.<span style="color:#a6e22e">exe</span>
<span style="color:#a6e22e">Send</span>, {<span style="color:#a6e22e">F11</span>}
<span style="color:#66d9ef">return</span>
</code></pre></div><blockquote>
<p>注意，在windows电脑上找到浏览器地址，例如我的google浏览器的运行地址是C:\Program Files\Google\Chrome\Application\chrome.exe， 然后空格写上要访问的地址</p>
</blockquote>
<p><img src="https://www.lican.site/images/1720774094310.png" alt="1720774094310"></p>
<p>在安装了AHK软件的情况下，双击hjb.ahk文件，即可全屏打开访问的地址并隐藏地址栏</p>
<h5 id="step3-将hjbahk文件放入开机自启动项中">Step3: 将hjb.ahk文件放入开机自启动项中<a href="#step3-将hjbahk文件放入开机自启动项中" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h5>
<p>Win+R打开cmd：输入shell:startup 打开开机自启动文件夹</p>
<p><img src="https://www.lican.site/images/1720774262011.png" alt="1720774262011"></p>
<p>将hjb.ahk文件复制到该文件夹中即可</p>
<p><img src="https://www.lican.site/images/1720774311169.png" alt="1720774311169"></p>

		</div>
	</main>

	<footer id="site-footer" class="section-inner thin animated fadeIn faster">
		<p>&copy; 2024 <a href="https://www.lican.site"></a></p>
		<p>
			Made with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> &#183; Theme <a href="https://github.com/Track3/hermit" target="_blank" rel="noopener">Hermit</a> &#183; <a href="https://www.lican.site/post/index.xml" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a>
		</p>
	</footer>


	<script src="https://www.lican.site/js/main.min.784417f5847151f848c339cf0acb13a06cbb648b1483435a28ed4556c4ead69b.js"></script>

</body>

</html>
